/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package kythuatregex;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 *
 * @author anh_yeu_em_nhieu_lam
 */
public class RegexBasic {

    public RegexBasic() {
        Pattern mypattern = Pattern.compile("I\\s+Love\\s+You");
        Matcher mymatcher = mypattern.matcher("Hello ^^! , I Love You ^^!");
        if(mymatcher.find()){
            System.out.print(mymatcher.group(0));
        }
    }
    
    public static void main(String arg[]){
        new RegexBasic();
    }
}
/*
I Love You
 * */